﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
public partial class Templates_MeritTable_Default : LoggedInPageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DataBind();
        }
    }

    protected void dsMeritTable_Select(object sender, Acms.DataControls.EventDrivenDataSourceSelectEventArgs e)
    {
        var factory = new CarbonExchange.Bll.FootprintSavingFactory();
        e.SetData(factory.Get(rgMeritTable.MasterTableView.SortExpressions.GetSortString(), AcmsContext.SiteId, e.SelectArguments.StartRowIndex, e.SelectArguments.MaximumRows));
        e.SelectArguments.TotalRowCount = factory.GetTotalCount(AcmsContext.SiteId);
    }

}
